package com.cgl.mapper;

import com.cgl.pojo.UserAction;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserActionMapper {
    @Insert("insert into user_actions(ip,action,createdDay,specifiedTime) values(#{ip},#{action},#{createDay},#{specifiedTime})")
    int addUserAction(UserAction userAction);
    @Select("select count(*) from user_actions where createdDay=#{day}")
    int getCountByDay(String day);
    @Select("select count(*) from user_actions")
    int getCount();
}
